/**
 *
 * @author Alberto Martinez Mena
 * @version  1.0
 * 28/08/2012
 */
package com.qsdm.es.core;

import com.qsdm.es.dao.*;
import com.qsdm.es.persistence.*;
import java.util.List;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*;

@Controller
@RequestMapping(value = "/services")
public class ServicesControllerImpl implements ServicesController {
    protected Log log = LogFactory.getLog(ServicesControllerImpl.class);
   
    @Autowired CompetenciaJpaController CompetenciaJpaController ; 
    @Autowired CursoJpaController CursoJpaController ; 
    @Autowired ExperiencialaboralJpaController ExperiencialaboralJpaController ; 
    @Autowired IdiomaJpaController IdiomaJpaController ; 
    @Autowired FormacionJpaController FormacionJpaController ; 
    @Autowired MunicipioJpaController MunicipioJpaController ; 
    @Autowired ProfesionJpaController ProfesionJpaController ; 
    @Autowired ProvinciaJpaController ProvinciaJpaController ; 
    @Autowired ProfesioncompetenciaJpaController ProfesioncompetenciaJpaController ; 
    @Autowired SectorprofesionalJpaController SectorprofesionalJpaController ; 
    @Autowired TipocontratoJpaController TipocontratoJpaController ; 
    @Autowired TipoformacionJpaController TipoformacionJpaController ; 
    @Autowired UsuarioJpaController UsuarioJpaController ; 
    @Autowired UsuariocompetenciaJpaController UsuariocompetenciaJpaController ; 
    @Autowired UsuarioformacionJpaController UsuarioformacionJpaController ; 
    @Autowired UsuarioidiomaJpaController UsuarioidiomaJpaController ; 

    
        @RequestMapping(value = "/sp/{sppadre}/{id}/{name}", method = RequestMethod.GET)
	public @ResponseBody@Override
         List<Sectorprofesional> obtenerSectoresProfesionales(@PathVariable("sppadre")String sppadre,@PathVariable("id")String id,@PathVariable("name")String name){
		return this.SectorprofesionalJpaController.findSectorprofesionalEntities();
	}
        
        @Transactional(propagation=Propagation.REQUIRED, rollbackFor=Exception.class)
        @RequestMapping(value = "/sp/add", method = RequestMethod.POST, headers ="Accept=application/json")
	public @ResponseBody@Override
 void insertarSectorProfesional(@RequestBody Sectorprofesional sp){

	}
         @Transactional(propagation=Propagation.REQUIRED, rollbackFor=Exception.class)
        @RequestMapping(value = "/sp/update", method = RequestMethod.POST, headers ="Accept=application/json")
	public @ResponseBody@Override
 void actualizarSectorProfesional(@RequestBody Sectorprofesional sp){

	}
       
         @RequestMapping(value = "/comp/{generica}/{id}/{name}", method = RequestMethod.GET)
	public @ResponseBody@Override
 List<Competencia> obtenerCompetencias(@PathVariable("generica")String generica,@PathVariable("id")String id,@PathVariable("name")String name){
		return null;
	}
        
        @Transactional(propagation=Propagation.REQUIRED, rollbackFor=Exception.class)
        @RequestMapping(value = "/comp/add", method = RequestMethod.POST, headers ="Accept=application/json")
	public @ResponseBody@Override
 void insertarCompetencia(@RequestBody Competencia sp){

	}
         @Transactional(propagation=Propagation.REQUIRED, rollbackFor=Exception.class)
        @RequestMapping(value = "/comp/add/{usuario}/{nivel}", method = RequestMethod.POST, headers ="Accept=application/json")
	public @ResponseBody@Override
 void insertarCompetenciaUsuario(@RequestBody Competencia sp,@PathVariable("usuario")String usuario,@PathVariable("nivel")String nivel){

	}
        @Transactional(propagation=Propagation.REQUIRED, rollbackFor=Exception.class)
        @RequestMapping(value = "/comp/update", method = RequestMethod.POST, headers ="Accept=application/json")
	public @ResponseBody@Override
 void actualizarCompetencia(@RequestBody Competencia sp){

	}
        
        @RequestMapping(value = "/elab/{sector}/{profesion}/{tipoContrato}/{usuario}", method = RequestMethod.GET)
	public @ResponseBody@Override
 List<Experiencialaboral> obtenerExperiencialaboral(@PathVariable("sector")String sector,@PathVariable("profesion")String profesion,
        @PathVariable("tipoContrato")String tipoContrato,@PathVariable("usuario")String usuario){
		return null;
	}
        
        @Transactional(propagation=Propagation.REQUIRED, rollbackFor=Exception.class)
        @RequestMapping(value = "/elab/add/{usuario}", method = RequestMethod.POST, headers ="Accept=application/json")
	public @ResponseBody@Override
 void insertarExperiencialaboral(@RequestBody Experiencialaboral sp,@PathVariable("usuario")String usuario){

	}
        @Transactional(propagation=Propagation.REQUIRED, rollbackFor=Exception.class)
        @RequestMapping(value = "/elab/{usuario}/{experiencia}", method = RequestMethod.DELETE, headers ="Accept=application/json")
	public @ResponseBody@Override
 void eliminarExperiencialaboral(@PathVariable("usuario")String usuario,@PathVariable("experiencia")String experiencia){

	}
        @Transactional(propagation=Propagation.REQUIRED, rollbackFor=Exception.class)
        @RequestMapping(value = "/elab/update/{usuario}", method = RequestMethod.POST, headers ="Accept=application/json")
	public @ResponseBody@Override
 void actualizarExperiencialaboral(@RequestBody Experiencialaboral sp,@PathVariable("usuario")String usuario){

	}
        
        
        @RequestMapping(value = "/idioma/{id}/{name}", method = RequestMethod.GET)
	public @ResponseBody@Override
 List<Idioma> obtenerIdioma(@PathVariable("id")String id,@PathVariable("name")String name){
		return IdiomaJpaController.findIdiomaEntities();
	}
        
        @Transactional(propagation=Propagation.REQUIRED, rollbackFor=Exception.class)
        @RequestMapping(value = "/idioma/add", method = RequestMethod.POST, headers ="Accept=application/json")
	public @ResponseBody@Override
 void insertarIdioma(@RequestBody Idioma sp){

	}
         @Transactional(propagation=Propagation.REQUIRED, rollbackFor=Exception.class)
        @RequestMapping(value = "/idioma/{id}", method = RequestMethod.DELETE, headers ="Accept=application/json")
	public @ResponseBody@Override
 void eliminarIdioma(@PathVariable("id")String id){

	}
        @Transactional(propagation=Propagation.REQUIRED, rollbackFor=Exception.class)
        @RequestMapping(value = "/idioma/add/{usuario}/{nivel}", method = RequestMethod.POST, headers ="Accept=application/json")
	public @ResponseBody@Override
 void insertarIdiomaUsuario(@RequestBody Idioma sp,@PathVariable("usuario")String usuario,@PathVariable("usuario")String nivel){

	}
        @Transactional(propagation=Propagation.REQUIRED, rollbackFor=Exception.class)
        @RequestMapping(value = "/idioma/update", method = RequestMethod.POST, headers ="Accept=application/json")
	public @ResponseBody@Override
 void actualizarIdioma(@RequestBody Idioma sp){

	}
        
        
        
         @RequestMapping(value = "/tformacion/{id}/{name}", method = RequestMethod.GET)
	public @ResponseBody@Override
 List<Tipoformacion> obtenerTipoFormacion(@PathVariable("id")String id,@PathVariable("name")String name){
		return TipoformacionJpaController.findTipoformacionEntities();
	}
        
        @Transactional(propagation=Propagation.REQUIRED, rollbackFor=Exception.class)
        @RequestMapping(value = "/tformacion/add", method = RequestMethod.POST, headers ="Accept=application/json")
	public @ResponseBody@Override
 void insertarTipoformacion(@RequestBody Tipoformacion sp){

	}
        
        @Transactional(propagation=Propagation.REQUIRED, rollbackFor=Exception.class)
        @RequestMapping(value = "/tformacion/update", method = RequestMethod.POST, headers ="Accept=application/json")
	public @ResponseBody@Override
 void actualizarTipoformacion(@RequestBody Tipoformacion sp){

	}
         @Transactional(propagation=Propagation.REQUIRED, rollbackFor=Exception.class)
        @RequestMapping(value = "/tformacion/{id}", method = RequestMethod.DELETE, headers ="Accept=application/json")
	public @ResponseBody@Override
 void eliminarTipoformacion(@PathVariable("id")String id){

	}
         @RequestMapping(value = "/formacion/{id}/{name}/{usuario/{tipo}", method = RequestMethod.GET)
	public @ResponseBody@Override
 List<Formacion> obtenerFormacion(@PathVariable("id")String id,@PathVariable("name")String name,@PathVariable("usuario")String usuario,@PathVariable("tipo")String tipo){
		return FormacionJpaController.findFormacionEntities();
	}
        
        @Transactional(propagation=Propagation.REQUIRED, rollbackFor=Exception.class)
        @RequestMapping(value = "/formacion/add", method = RequestMethod.POST, headers ="Accept=application/json")
	public @ResponseBody@Override
 void insertarFormacion(@RequestBody Formacion sp){

	}
        
        @Transactional(propagation=Propagation.REQUIRED, rollbackFor=Exception.class)
        @RequestMapping(value = "/formacion/add/{usuario}/{centro}/{anios}", method = RequestMethod.POST, headers ="Accept=application/json")
	public @ResponseBody@Override
 void insertarFormacionUsuario(@RequestBody Formacion sp,@PathVariable("usuario")String usuario,@PathVariable("centro")String centro,@PathVariable("anios")String anios){

	}
        @Transactional(propagation=Propagation.REQUIRED, rollbackFor=Exception.class)
        @RequestMapping(value = "/formacion/update/{usuario}/{centro}/{anios}", method = RequestMethod.POST, headers ="Accept=application/json")
	public @ResponseBody@Override
 void actualizarFormacionUsuario(@RequestBody Formacion sp,@PathVariable("usuario")String usuario,@PathVariable("centro")String centro,@PathVariable("anios")String anios){

	}
        @Transactional(propagation=Propagation.REQUIRED, rollbackFor=Exception.class)
        @RequestMapping(value = "/formacion/delete/{usuario}/{formacion}", method = RequestMethod.POST, headers ="Accept=application/json")
	public @ResponseBody@Override
 void eliminarFormacionUsuario(@RequestBody Formacion sp,@PathVariable("usuario")String usuario,@PathVariable("formacion")
                String formacion){

	}
        @Transactional(propagation=Propagation.REQUIRED, rollbackFor=Exception.class)
        @RequestMapping(value = "/formacion/update", method = RequestMethod.POST, headers ="Accept=application/json")
	public @ResponseBody@Override
 void actualizarFormacion(@RequestBody Formacion sp){

	}
        
        @Transactional(propagation=Propagation.REQUIRED, rollbackFor=Exception.class)
        @RequestMapping(value = "/cformacion/add", method = RequestMethod.POST, headers ="Accept=application/json")
	public @ResponseBody@Override
 void insertarCentroformacion(@RequestBody Centroformacion sp){

	}
        @RequestMapping(value = "/cformacion/{id}/{name}/{municipio}", method = RequestMethod.GET)
	public @ResponseBody@Override
 List<Centroformacion> obtenerCentroformacion(@PathVariable("id")String id,@PathVariable("name")String name,@PathVariable("municipio")String municipio){
		return null;
	}
        
        @Transactional(propagation=Propagation.REQUIRED, rollbackFor=Exception.class)
        @RequestMapping(value = "/cformacion/delete/{usuario}/{formacion}", method = RequestMethod.POST, headers ="Accept=application/json")
	public @ResponseBody@Override
 void eliminarCentroformacion(@RequestBody Centroformacion sp,@PathVariable("usuario")String usuario,@PathVariable("formacion")
                String formacion){

	}
        @Transactional(propagation=Propagation.REQUIRED, rollbackFor=Exception.class)
        @RequestMapping(value = "/cformacion/update", method = RequestMethod.POST, headers ="Accept=application/json")
	public @ResponseBody@Override
 void actualizarCentroformacion(@RequestBody Centroformacion sp){

	}
        
        
        
         
        @RequestMapping(value = "/provincia/{id}/{name}", method = RequestMethod.GET)
	public @ResponseBody@Override
 List<Provincia> obtenerProvicia(@PathVariable("id")String id,@PathVariable("name")String name){
		return ProvinciaJpaController.findProvinciaEntities();
	}
        @RequestMapping(value = "/municipio/{id}/{name}/{provincia}/{codigoPostal}", method = RequestMethod.GET)
	public @ResponseBody@Override
 List<Municipio> obtenerMunicipio(@PathVariable("id")String id,@PathVariable("name")String name,@PathVariable("provincia")String provincia,@PathVariable("codigoPostal")String codigoPostal){
		return MunicipioJpaController.findMunicipioEntities();
	}
        
        
        @Transactional(propagation=Propagation.REQUIRED, rollbackFor=Exception.class)
        @RequestMapping(value = "/tContrato/add", method = RequestMethod.POST, headers ="Accept=application/json")
	public @ResponseBody@Override
 void insertarTipocontrato(@RequestBody Tipocontrato sp){

	}
        @RequestMapping(value = "/tContrato/{id}/{name}", method = RequestMethod.GET)
	public @ResponseBody@Override
 List<Tipocontrato> obtenerTipocontrato(@PathVariable("id")String id,@PathVariable("name")String name
                ){
		return TipocontratoJpaController.findTipocontratoEntities();
	}
        
        @Transactional(propagation=Propagation.REQUIRED, rollbackFor=Exception.class)
        @RequestMapping(value = "/tContrato/{id}", method = RequestMethod.DELETE, headers ="Accept=application/json")
	public @ResponseBody@Override
 void eliminarTipocontrato(@PathVariable("id")String id){
            
	}
        @Transactional(propagation=Propagation.REQUIRED, rollbackFor=Exception.class)
        @RequestMapping(value = "/tContrato/update", method = RequestMethod.POST, headers ="Accept=application/json")
	public @ResponseBody@Override
 void actualizarTipocontrato(@RequestBody Tipocontrato sp){

	}
        
         @Transactional(propagation=Propagation.REQUIRED, rollbackFor=Exception.class)
        @RequestMapping(value = "/user/add", method = RequestMethod.POST, headers ="Accept=application/json")
	public @ResponseBody@Override
 void insertarUsuario(@RequestBody Usuario sp){

	}
        @RequestMapping(value = "/user/{id}/{name}", method = RequestMethod.GET)
	public @ResponseBody@Override
 List<Usuario> obtenerUsuario(@PathVariable("id")String id,@PathVariable("name")String name
                ){
		return null;
	}
        
        @Transactional(propagation=Propagation.REQUIRED, rollbackFor=Exception.class)
        @RequestMapping(value = "/user/{id}", method = RequestMethod.DELETE, headers ="Accept=application/json")
	public @ResponseBody@Override
 void eliminarUsuario(@PathVariable("id")String id){
            
	}
        @Transactional(propagation=Propagation.REQUIRED, rollbackFor=Exception.class)
        @RequestMapping(value = "/user/update", method = RequestMethod.POST, headers ="Accept=application/json")
	public @ResponseBody@Override
 void actualizarUsuario(@RequestBody Usuario sp){

	}
        
        
        
        
}
